import request from '@/utils/request'
export default{
  getChapters(courseId) {
    return request({
      url: `/admin/edu/chapter/getChapters/${courseId}`,
      method: 'GET'
    })
  },
  save(chapter) {
    return request({
      url: '/admin/edu/chapter/save',
      method: 'POST',
      data: chapter
    })
  },
  update(chapter) {
    return request({
      url: '/admin/edu/chapter/update',
      method: 'PUT',
      data: chapter
    })
  },
  remove(id) {
    return request({
      url: `/admin/edu/chapter/remove/${id}`,
      method: 'DELETE'
    })
  },
  getById(id) {
    return request({
      url: `/admin/edu/chapter/get/${id}`,
      method: 'GET'
    })
  }
}
